<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

		<script src="http://apps.bdimg.com/libs/jquery/1.11.1/jquery.min.js"></script>
		<script src="http://apps.bdimg.com/libs/layer/2.1/layer.js"></script>
		
	</head>
	<body>  
		<div class="page-header">
  			<h1><p class="text-center">All Visit Count</p></h1>
		</div>
    <div ng-app="Notes" ng-controller="NotesCtrl" style="width: 500px;margin: auto;">  
        <table class="table table-bordered"style="margin:20px;">
		<th>soft name</th>
		<th>count</th>
		<th>look</th>
		<tr ng-repeat="gee in bee.data">
		<td>{{ gee.soft}}</td>
		<td><a href="record.html?id={{ gee.id}}">{{ gee.count}}次  （详情）</a></td>
		<td onclick="show(this)">查看</td>
		</tr>
		</table>
    </div> 
  <!--   //http://apps.bdimg.com/libs/angular.js/1.5.0-beta.0/angular.js-->

<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<script src="https://cdn.bootcss.com/angular-resource/1.2.28/angular-resource.min.js"></script>
<script type="text/javascript">  
 
var Demo = angular.module('Notes', ['ngResource']); 

Demo.factory('Notes', ['$resource', function($resource) {
    return $resource('http://www.haol.site/link/visit/see',{},{
    	query: {method:'GET', params:{}, isArray:true}
    });
}]);


Demo.controller('NotesCtrl', ['$scope', 'Notes', function($scope, Notes) {
  
   $scope.bee =Notes.get();

}]);
  

function show(e){
//id,name,phone,time,ip,message
//页面层

  	var duc   =$(e).parents('tr').find('td');
  	var value = [];
  	var str   ="";
  	for(var i=0;i<6;i++){
  		value[i] =duc.eq(i).html();
  	}
	
	str +="<table class='table table-striped'>";
  	str +="<tbody>";
    str +="<tr><td>softname</td><td>"+value[0]+"</td></tr>";
    str +="<tr><td>count</td><td>"+value[1]+"</td></tr>";
   
    str +="</tbody></table>";

  
  	
layer.open({
  type: 1,
  skin: 'layui-layer-lan', //样式类名
  closeBtn: 0, //不显示关闭按钮
  anim: 3,
  title:'详细信息',
  shadeClose: true, //开启遮罩关闭
  content: str,
  area: ['300px', '300px'],
});

}

    </script>  
</body>  
</html>
